﻿using UnityEngine;
using System.Collections;

public class RoateGold : MonoBehaviour {
	void Update()
    {
        transform.Rotate(Vector3.forward, 3f);
	}

    void OnTriggerEnter(Collider collider)
    {
        if (collider.name == "Ami")
        {
            EventManager.PostEvent(GameUI.DataType.Gold, 1);
            EventManager.PostEvent(Character.DataType.PlayAudio, "gear", false);
            GameObject.Destroy(gameObject);
        }
    }
}
